import request from '@/utils/request'
import { parseStrEmpty } from '@/utils'

// 查询客户信息
export function listCustomer(query) {
  return request({
    url: '/o2o/customer/list',
    method: 'get',
    params: query
  })
}
// 根据id查询客户信息
export function getCustomer(clientId) {
  return request({
    url: '/o2o/customer/' + parseStrEmpty(clientId),
    method: 'get'
  })
}
// 导出客户
export function exportCustomer(query) {
  return request({
    url: '/o2o/customer/export',
    method: 'get',
    params: query
  })
}

// 下载商户导入模板
export function importTemplate() {
  return request({
    url: '/o2o/customer/importTemplate',
    method: 'get'
  })
}

export function getCustOptions(query) {
  return request({
    url: '/o2o/customer/optionselect/' + parseStrEmpty(query),
    method: 'get',
  })
}
